package test;

import io.vertx.greatbit.Settings;
import java.net.URL;
import org.junit.Test;
import com.fasterxml.jackson.databind.ObjectMapper;

public class JsonLoad {
	@Test
	public void testLoad() {
		try {
			ObjectMapper mapper = new ObjectMapper();
			URL url = this.getClass().getClassLoader().getResource("./settings.json");
			if (url != null) {
				System.out.println(url.getFile());
				Settings settings = mapper.readValue(url, Settings.class);
				System.out.println(settings.getExcludes());
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
